﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ABCApp.Console
{
    class Program
    {
        static void Main(string[] args)
        {

            ABCApp.Domain.Customer c;

            ABCApp.DAL.Customer dalCustomer = new ABCApp.DAL.Customer();

            try
            {
                c = dalCustomer.GetCustomerById(1);
                System.Console.WriteLine(c.CustomerId.ToString() + " - " + c.FirstName.ToString() + " " + c.LastName.ToString());
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex.Message);
            }

            System.Console.ReadKey();

            try
            {
                IList<Domain.Customer> lstCustomer = dalCustomer.GetCustomers();

                foreach (Domain.Customer customer in lstCustomer)
                {
                    System.Console.WriteLine(customer.CustomerId.ToString() + " - " + customer.FirstName.ToString() + " " + customer.LastName.ToString());
                }
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex.Message);
            }
            
            System.Console.ReadKey();
        }
    }
}
